/**
 * 
 */
package com.softwareinlife.xmpp.client;

import org.jivesoftware.smack.SASLAuthentication;
import org.jivesoftware.smack.sasl.SASLPlainMechanism;

/**
 * @author jangsunjin
 * 
 */
public class GoogleSASLPlainMechanism extends SASLPlainMechanism {

	/**
	 * Constructor
	 */
	public GoogleSASLPlainMechanism(SASLAuthentication saslAuthentication) {
		super(saslAuthentication);
	}

	/**
	 * 
	 * 
	 * @param username
	 * @param host
	 * @param password
	 * @return
	 */
	protected String getAuthenticationText(String username, String host,
			String password) {
		if ("talk.google.com".equalsIgnoreCase(host)) {
			host = "gmail.com";
		}
		
		return getAuthenticationText(username, host, password);
	}
}
